package com.bloveoacom.weichi.contract;



import com.bloveoacom.http.HttpResult;
import com.bloveoacom.mvp.BaseListPresenter;
import com.bloveoacom.mvp.IListView;
import com.bloveoacom.mvp.IModel;
import com.bloveoacom.weichi.bean.Comment2Bean;
import com.bloveoacom.weichi.bean.CommentBean;
import com.bloveoacom.weichi.bean.PostCoinBean;
import com.bloveoacom.weichi.bean.PostDetailBean;
import com.bloveoacom.weichi.bean.RewardBean;

import java.util.List;

import io.reactivex.Flowable;
import retrofit2.http.Field;
import retrofit2.http.Query;

/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/8/22
 * desc  : 我的
 */
public interface PostDetailContract {

    //页面 从model获取数据。
    interface View extends IListView {
             //帖子详情
             void newDetail(PostDetailBean bean);
             //评论结果
             void comment(RewardBean bean);
             //评论列表结果
             void commentList(Comment2Bean bean);
             //关注结果
             void userFocus(Object bean);
             //收藏结果
             void goCollection(Object bean);
             //点赞结果
             void collect(RewardBean bean);

             String getNewsId();
    }

    //获取到的页面数据
    interface Model extends IModel {
        Flowable<HttpResult<PostDetailBean>> getCoinNewsDetail(String coinId);
        Flowable<HttpResult<Comment2Bean>> getCommentList(int pageNum, int pageSize, String coinId);
        Flowable<HttpResult<RewardBean>> comment(
                String coinId,
                String replyCommentId,
                String replyUserId,
                String type,
                String content,
                String sign);
        Flowable<HttpResult<Object>> userFocus(String targetUserId,int type);

        Flowable<HttpResult<Object>> goCollection(String coinId,int type,int isCollect);

        Flowable<HttpResult<RewardBean>> collect(String objectId,int type, int isCollected);
        Flowable<HttpResult<Object>> findTimeStamp();
        Flowable<HttpResult<Object>> fenpeiEmt(String coinId,String overType);

    }

    //交互P
    abstract class Presenter extends BaseListPresenter<View, Model> {
        public abstract void getCoinNewsDetail();
        public abstract void comment(
                String replyCommentId,
                String replyUserId,
                String type,
                String content,
                String sign);
        public abstract void userFocus(String targetUserId,int type);

        public abstract void goCollection(int type,int isCollect);

        public abstract void collect(String objectId,int type, int isCollected);
        public abstract void fenpeiEmt(String overType);
    }
}
